]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspacesView: Use work area for default geometry
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 25 Jun 2020 23:08:29 +0000 (01:08 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 6 Jul 2020 22:06:53 +0000 (00:06 +0200)
The workspace's layout manager keeps the workspace at the same ratio as
the work area, so it makes more sense to base the views' default geometry
on that as well than the monitor area we are using right now.

(It shouldn't matter much in practice, as this only affects views on
non-primary monitors where the work area usually matches the monitor area)

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345

js/ui/workspacesView.js

index 77661b287736c4a558852b8153dc13c0527f23b8..0a7a306b12fd10418882c2815079227e7d92a620 100644 (file)
@@ -22,7 +22,7 @@ var WorkspacesViewBase = GObject.registerClass({
 }, class WorkspacesViewBase extends St.Widget {
     _init(monitorIndex) {
         const { x, y, width, height } =
-            Main.layoutManager.monitors[monitorIndex];
+            Main.layoutManager.getWorkAreaForMonitor(monitorIndex);
 
         super._init({
             style_class: 'workspaces-view',